#pragma once
#include <QObject>
#include <QString>
#include <QMetaObject>
#include <QStringListModel>
#include "MAVLinkInspectorController.h"
#include "MultiVehicleManager.h"
#include "MAVLinkProtocol.h"
#include "Vehicle.h"
#include "QmlObjectListModel.h"
#include "QGCApplication.h"
#include "UAS.h"
#include <QtCharts/QLineSeries>
// Fordward decls
class Vehicle;

class Swarm : public QObject
{
    Q_OBJECT

public:
    Swarm();
    virtual ~Swarm();
    Q_INVOKABLE void sendStartCommand();

    Q_PROPERTY(QString          test1       READ test1   WRITE setTest1   NOTIFY valueChanged)
    QString         test1           ()
    {
        return _test1;
    }
    Q_PROPERTY(QString          test2       READ test2   WRITE setTest2   NOTIFY valueChanged2)
    QString         test2           ()
    {
        return _test2;
    }

    void setTest1(QString test1);
    void setTest2(QString test2);

signals:
    void    valueChanged();
    void    valueChanged2();
    void    _testChanged();

private slots:
    void _receiveMessage            (LinkInterface* link, mavlink_message_t message);

private:
    QString     _test1="A";
    QString     _test2="a";
    QmlObjectListModel* _vehiclelist;
    Vehicle*      _vehicle;
    bool start_swarm=false;
};

